package com.laoxu.student.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laoxu.student.business.entity.Major;
import com.laoxu.student.business.mapper.MajorMapper;
import com.laoxu.student.business.service.MajorService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laoxu.student.business.vo.MajorVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 专业 服务实现类
 * </p>
 *
 * @author Laoxu
 * @since 2020-04-04
 */
@Service
public class MajorServiceImpl extends ServiceImpl<MajorMapper, Major> implements MajorService {

    @Override
    public void pageQuery(Page<MajorVO> page) {
         List<MajorVO> records = baseMapper.selectMajorList(page);
         page.setRecords(records);
         page.setTotal(records.size());

    }
}
